package com.dragon.common.modules.uaa.domain.entity;

import com.dragon.common.spring.business.base.jpa.audit.AbstractCommonAuditEntity;
import jakarta.persistence.*;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.annotations.ColumnDefault;

@Getter
@Setter
@Entity
@Table(name = "uaa_account_third")
public class UaaAccountThirdEntity extends AbstractCommonAuditEntity {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id", nullable = false)
    private Long id;

    @NotNull
    @Column(name = "account_code", nullable = false)
    private Long accountCode;

    @NotNull
    @Column(name = "third_code", nullable = false)
    private Long thirdCode;

    @NotNull
    @ColumnDefault("0")
    @Column(name = "platform_type", nullable = false)
    private Byte platformType;

    @Size(max = 128)
    @Column(name = "avatar", length = 128)
    private String avatar;

}